﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminCP/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage<InfoTech.Mvc.LanTranh.MucVu.Models.HOGIADINH_DIACHIModel>" %>

<%@ Import Namespace="InfoTech.LanTranh.MucVu.Service" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content-box addGiaoDan">
        <div class="content-box-header">
            <h3>
                Cập Nhật Hộ Gia Đình</h3>
        </div>
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <%
                Html.EnableClientValidation(); %>
            <% 
                using (Html.BeginForm())
                {%>
            <%: Html.ValidationSummary() %>
            <%:Html.HiddenFor(c=>c.MADIACHI) %>
            <%:Html.HiddenFor(c=>c.MAHOGIADINH) %>
            <table cellpadding="3" cellspacing="3">
                <tr>
                    <td class="title" colspan="5">
                        Thông Tin Hộ Gia Đình
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td colspan="5">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle" style="text-decoration: underline">
                        Tên Chủ Hộ:
                    </td>
                    <td>
                        <div class="editor-field">
                            <%:Html.HiddenFor(c=>c.TENCHUHO) %>
                            <%:Html.HiddenFor(c=>c.MACHUHO) %>
                            <%=Html.ActionLink(Model.TENCHUHO,"EditGiaoDan",new {id=Model.MACHUHO}) %>
                        </div>
                    </td>
                    <td width="10">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle">
                        Mã Hộ Gia Đình:
                    </td>
                    <td>
                        <div class="editor-field">
                            <%=Html.ActionLink(Model.HOGIADINHID, "EditHoGiaDinh", new { id = Model.MAHOGIADINH })%>
                            <%:Html.HiddenFor(c=>c.HOGIADINHID) %>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                    </td>
                    <td>
                    </td>
                    <td width="10">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Từ
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="editor-field">
                                        <%: Html.DropDownListFor(model => model.TUTHANG,GIAODANService.Get_List_Months(), new { style = "width: 145px", @class="text-input" })%>
                                        <%: Html.ValidationMessageFor(model => model.TUTHANG, "(*)")%>
                                    </div>
                                </td>
                                <td>
                                    <div class="editor-field">
                                        <%: Html.DropDownListFor(model => model.TUNAM,GIAODANService.Get_List_Years(), new { style = "width: 135px", @class="text-input" })%>
                                        <%: Html.ValidationMessageFor(model => model.TUNAM, "(*)")%>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Đến
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <div class="editor-field">
                                        <%: Html.DropDownListFor(model => model.DENTHANG,GIAODANService.Get_List_Months(), new { style = "width: 145px", @class="text-input" })%>
                                        <%: Html.ValidationMessageFor(model => model.DENTHANG, "(*)")%>
                                    </div>
                                </td>
                                <td>
                                    <div class="editor-field">
                                        <%: Html.DropDownListFor(model => model.DENNAM,GIAODANService.Get_List_Years(), new { style = "width: 135px", @class="text-input" })%>
                                        <%: Html.ValidationMessageFor(model => model.DENNAM, "(*)")%>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Địa Chỉ
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.TextBoxFor(model => model.DIACHI, new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.DIACHI, "(*)")%>
                        </div>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Dùng Làm Địa Chỉ
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.CheckBox("default", new {  @class="text-input" })%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="title" colspan="5">
                        Thông Tin Mục Vụ
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Phận
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAGIAOPHAN,GIAOPHANService.Get_List(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAGIAOPHAN, "(*)")%>
                        </div>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Hạt
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAGIAOHAT,GIAOHATService.Get_List_Join_GiaoPhan(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAGIAOHAT, "(*)")%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Xứ
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAGIAOXU,GIAOXUService.Get_List_Join_GiaoPhan_GiaoHat(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAGIAOXU, "(*)")%>
                        </div>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Họ
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAGIAOHO,GIAOHOService.Get_List_Join_GiaoPhan_GiaoHat_GiaoXu(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAGIAOHO, "(*)")%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="title" colspan="5">
                        Thông Tin Hành Chính
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Quốc Gia
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAQUOCGIA,QUOCGIAService.Get_List(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAQUOCGIA, "(*)")%>
                        </div>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Tỉnh Thành
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MATINHTHANH,TINHTHANHService.Get_List_Join_Country(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MATINHTHANH, "(*)")%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Quận Huyện
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAQUANHUYEN,QUANHUYENService.Get_List_Join_City_Country(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAQUANHUYEN, "(*)")%>
                        </div>
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        &nbsp;
                    </td>
                    <td align="right" class="cellTitle" valign="middle">
                        Xã Phường
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownListFor(model => model.MAXAPHUONG,XAPHUONGService.Get_List_Join_City_Country_District(), new { style = "width: 250px", @class="text-input" })%>
                            <%: Html.ValidationMessageFor(model => model.MAXAPHUONG, "(*)")%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="lineRow" colspan="5">
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                    </td>
                    <td>
                        <input type="submit" value="Cập nhật địa chỉ cư ngụ" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
                    </td>
                </tr>
            </table>
            <% } %>
        </div>
        <!-- End .content-box-content -->
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderCss" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderScript" runat="server">
    <script type="text/javascript" src="<%=Html.AreaScriptPath("AdminCP") %>MucVu.js"></script>
    <script type="text/javascript" src="<%=Html.AreaScriptPath("AdminCP") %>HanhChinh.js"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#MAGIAOPHAN").change(function () {
                Change_GiaoPhan('addGiaoDan', '<%=Url.Action("Get_GIAOHAT","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MAGIAOHAT").change(function () {
                Change_GiaoHat('addGiaoDan', '<%=Url.Action("Get_GIAOXU","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MAGIAOXU").change(function () {
                Change_GiaoXu('addGiaoDan', '<%=Url.Action("Get_GIAOHO","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MAQUOCGIA").change(function () {
                Change_QuocGia('addGiaoDan', '<%=Url.Action("Get_TINHTHANH","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MATINHTHANH").change(function () {
                Change_TinhThanh('addGiaoDan', '<%=Url.Action("Get_QUANHUYEN","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MAQUANHUYEN").change(function () {
                Change_QuanHuyen('addGiaoDan', '<%=Url.Action("Get_XAPHUONG","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
        })
    </script>
</asp:Content>
